package com.yuanyefu.ModifyDefinition;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;



/**
 * Created by Administrator on 2017/9/16 0016.
 */
public class Main {
    public static void main(String[] args){
       ApplicationContext context = new ClassPathXmlApplicationContext("/spring/definition.xml");
        System.out.println(context.getBean("beanA"));
        System.out.println( context.getBean("beanB"));
        System.out.println(context.getBean("order"));
        MessagePublisher messagePublisher= (MessagePublisher) context.getBean("messagePublisher");
        messagePublisher.sendMessage("Hello, everyone!");
    }
}
